/*
* Copyright (C) 2024-2025 Uniontech Technology Co., Ltd.
*
* Author:      zhangbingyi <zhangbingyia@uniontech.com>
*
* Maintainer:  zhangbingyi <zhangbingyia@uniontech.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRUSTEDPROTECTIONTDIFINITION_H
#define TRUSTEDPROTECTIONTDIFINITION_H

#include <QObject>
#include <QString>
#include <QStringList>

#define OBJECT_COLUMN 0
#define PATH_COLUMN 1
#define STATUS_COLUMN 2
#define POLICY_COLUMN 3

#define CHECKED_STATUS_ROLE Qt::UserRole + 1
#define ABNORMAL_STATUS_ROLE Qt::UserRole + 2
#define CUSTOM_POLICY_TYPE_ROLE Qt::UserRole + 3
#define DELETE_FLAG_ROLE Qt::UserRole + 4
#define POLICY_TYPE_ROLE Qt::UserRole + 5
#define FILE_EXIST_STATUS_ROLE Qt::UserRole + 6

//#define COMBOBOX_STATUS_ROLE Qt::EditRole

#define CHECKED true
#define UNCHECKED false

#define NORMAL 0
#define ABNORMAL 1
#define DELETED 2

#define COMBO_PROHIBIT 0
#define COMBO_WARNING 1
#define COMBO_ALLOW 2

#define DATA_DELETE_FALG_DEFAULT 0
#define DATA_DELETE_FALG_DELETED 1

#define ABNORMAL_FONT_BG_COLOR "#FF5736"

#define ICON_WARNING ":/icons/deepin/builtin/icons/dcc_trustedprotection_warning_icon20.svg"
#define ICON_FORBID ":/icons/deepin/builtin/icons/dcc_trustedprotection_forbid_icon_20px.svg"

#define POLICY_DEFAULT 1
#define POLICY_CUSTOM 2

#define CustomPolicyUnknow 1
#define CustomPolicyWarn 2
#define CustomPolicyAllow 3
#define CustomPolicyDeny 4

#define IMAStatusUnknow 0
#define IMAStatusUnavailable 1
#define IMAStatusDisabled 2
#define IMAStatusEnabled 3

// 标记策略是添加还是更新
#define IMA_POLICY_MODIFY_UPDATE 0
#define IMA_POLICY_MODIFY_ADD 1

const QStringList kFileNameList = {
    "application/x-binary",
    "application/x-elf",
    "application/x-executable",
    "application/x-pie-executable",
    "text/x-sh",
    "text/x-script.sh",
    "application/x-sh",
    "text/x-shellscript",
    "text/x-script.python",
    "application/x-bytecode.python",
    "text/x-python"};

#endif // TRUSTEDPROTECTIONTDIFINITION_H
